import axios from "../until/axios";
import api from "./api";

// 法律事件
export const Allfv = () =>
  axios({
    method: "get",
    url: api.legislation.specialty,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

// 全部律师
export const lawyer = () =>
  axios({
    method: "get",
    url: api.legislation.lawyer,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

// 律师个人详情

export const xianq = (params) =>
  axios({
    method: "get",
    url: api.legislation.leiou + `${params.id}`,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

export const goodlist = () =>
  axios({
    method: "get",
    url: api.legislation.googLay,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

// 轮播图
export const swiper = () =>
  axios({
    method: "get",
    url: api.legislation.swiper,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
// 律师的好评
export const goodlun = (params) =>
  axios({
    method: "get",
    url: api.legislation.goodpil + `?lawyerId=${params.id}`,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });
// 资讯
export const cako = (data) =>
  axios({
    method: "post",
    url: api.legislation.zhix,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data,
  });
